package day06;

import java.util.Random;
import java.util.Scanner;

public class Day06TextMax2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入有几个随机数");
        int [] arr = printArrayData(scan.nextInt());

    }
    public static int [] printArrayData(int n){
        Random rand = new Random();
        int[] arr = new int[n];
        for (int i=0;i<arr.length;i++){
            arr[i]= rand.nextInt(10)+1;
            System.out.println(arr[i]);
        }
        return arr;
    }
}
